package jdk.java.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class CollectionsTest {
	@SuppressWarnings({"unchecked","rawtypes"})
	public static void main(String[] args) {
		List<String> strs = new ArrayList<>();
		List wrapper = strs;
		wrapper.add(1);
		System.out.println(wrapper);
		
		List<String> cheekecWrapper = Collections.checkedList(strs, String.class);
		wrapper = cheekecWrapper;
		System.out.println(wrapper);
		wrapper.add(1);
		System.out.println(wrapper);
	}
}
